// ActionScript file
import flash.events.MouseEvent;

import mx.core.UIComponent;
import mx.events.FlexEvent;

import net.cherrylab.war.model.WarModelLocater;
import net.cherrylab.war.view.Checkerboard;
import net.cherrylab.war.view.DrawLine;
import net.cherrylab.war.view.Hexagon;
import net.cherrylab.war.view.HexagonGrid;

[Bindable]
private var model:WarModelLocater=WarModelLocater.getInstance();


protected function application_creationCompleteHandler(event:FlexEvent):void
{
	controlBox.initBtn.addEventListener(MouseEvent.CLICK,this.initMap);
	
	
	
}
private function initMap(e:MouseEvent):void
{
	this.checkerboardGroup.removeAllElements();
	var newCheck:Checkerboard=new Checkerboard(controlBox.vNum.value,controlBox.hNum.value);
	
	//newCheck.horizontal=controlBox.hNum.value;
	//newCheck.vertical=controlBox.vNum.value;
	
	this.checkerboardGroup.addElement(newCheck);
	newCheck.x=0	;
	newCheck.y=0;
}
